Skip to content

Fix deprecation warning when running with latest hugo version 0.156.0#2578

Closed
deining wants to merge 1 commit into
google:mainfrom
deining:fix-deprecation-warning
Closed

Fix deprecation warning when running with latest hugo version 0.156.0#2578
deining wants to merge 1 commit into
google:mainfrom
deining:fix-deprecation-warning

Conversation

@deining

@deining deining commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

When running dosy.dev site with latest released hugo version 0.156.0, a deprecation warning is printed out:

INFO  deprecated: .Site.Languages was deprecated in Hugo v0.156.0
and will be removed in a future release.
See https://discourse.gohugo.io/t/56732.

This PR fixes this issue.

@chalin chalin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I'll take a closer look at the code changes as soon as I can. In the meantime, I've simply updated Hugo versions via #2585 (FYI).

@chalin chalin force-pushed the fix-deprecation-warning branch from d749a7d to f3c2027 Compare March 1, 2026 00:10
chalin added a commit to chalin/docsy that referenced this pull request Jun 11, 2026
Migrate theme templates and docs off the language config keys and
methods deprecated in Hugo 0.156.0/0.158.0; raise the theme's
minimum Hugo version to 0.158.0 (a 0.16 breaking change):

- theme.toml / theme/hugo.yaml: min version 0.146.0 -> 0.158.0
- Theme templates: Language.Lang -> .Name,
  LanguageDirection -> .Direction, LanguageName -> .Label
- navbar-lang-selector.html: range .Site.Languages -> hugo.Sites
  (preserves disabled entries for untranslated languages)
- offline-search-index.json: .Site.AllPages -> hugo.Sites/.Pages
- User-guide docs: languageName -> label, languageDirection -> direction
- Changelog: breaking-change entry; thanks to @deining (google#2594, google#2578)

Builds now log zero deprecation notices at --logLevel info.
@chalin

chalin commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

@deining, thanks for catching and fixing this early! Since the repo reorg created conflicts, this work has been folded into #2647 along with the other language-API migrations (you're credited in the changelog). Closing as superseded once #2647 lands. Thanks again!

@chalin chalin added this to the 26Q2 milestone Jun 11, 2026
@chalin chalin closed this Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants